

/*
 * Created by asus on 2017/4/12.
 */
public class Staff {
    private StaffMumber[] staffList;
        public Staff()
        {
            staffiList = new StaffMember[6];
            staffiList[0] = new Executive ("Tony","123 Main Line","555-0469","123-45-6789",2423.07);
            staffiList[1] = new Executive ("Paulie","456 Off Line","555-0469","123-45-6789",2423.07);
            staffiList[2] = new Executive ("Vito","789 Off Rocker","555-0469","123-45-6789",2423.07);
            staffiList[3] = new Executive ("Michael","678 Fifth Ave","555-0469","123-45-6789",2423.07);
            staffiList[4] = new Executive ("Adrianna","123 Main Line","555-0469","123-45-6789",2423.07);
            staffiList[5] = new Executive ("Benny","123 Main Line","555-0469","123-45-6789",2423.07);
       	    ((Executive)staffList[0]).awardBonus(500.00);
	    ((Hourly)staffList[3].addHours(40);
	
	}
public void payday(){
	double amount;
	for (int count = 0;count < staffList.length;count++){
	System.out.println(staffList[count]);
	amount = staffList[count].pay();
	if (amount == 0.0)
		    System.out.println ("Thanks!");
	else
		    System.out.println ("Paid:" + amount);
	    System.out.println("----------------------------------------");
	
	}
}

}




    }

